﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Pixysoft.Framework.Noebe.testdriven
{
    class tc_001
    {
        public static void test()
        {
            object value_int = 12;
            object value_string = "hello";
            object value_byte = new byte[] { 1, 2, 3 };

            NoebeParameterCollection collection = new NoebeParameterCollection();
            collection.Add("KEY1", value_int);
            collection.Add("KEY2", value_string);
            collection.Add("KEY3", value_byte);

            collection.OnLoad();

            collection.Add("KEY1", value_int);
            collection.Add("KEY2", value_string);
            collection.Add("KEY3", value_byte);

            foreach (NoebeKeyValuePair<string, object> pair in collection.CurrentParaList)
            {
                Console.WriteLine(pair.Key + ":" + pair.Value);
            }

            collection.Adjusting();

            Console.WriteLine(collection.ContainsKey("KEY1"));

            collection.RemoveAt(0);

            Console.WriteLine(collection["KEY2"]);

            collection.UnLoad();

            collection.Next();

            collection.AddType("KEY1", value_int.GetType());
            collection.AddType("KEY2", value_string.GetType());
            collection.AddType("KEY3", value_byte.GetType());
        }
    }
}
